package com.dy.template;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class FireFoxTestNg {
    WebDriver driver;
    @BeforeMethod
    public void SetUp(){
        System.setProperty("webdriver.gecko.driver","C:\\Program Files\\Mozilla Firefox\\geckodriver.exe");
        driver=new FirefoxDriver();
    }
    @Test
    public  void  test() throws InterruptedException {
        driver.get("https://www.baidu.com");
    }
    @AfterMethod
    public  void  afterMethod(){
        //driver.close();
    }

}
